<?php
abstract class AMS_Core_Model_Template_Abstract extends AMS_Core_Model_Abstract {
    protected $templateFilename;
    protected $layoutFile;
    protected $layout;
    
    public function setLayout($layout) {
        $this->layout = $layout;
        return $this;
    }
    public function setTemplate($filename) {
        if (!file_exists($filename))
            $this->templateFilename = AMS::getDesign()->getTemplate($filename);
        else
            $this->templateFilename = $filename;
        return $this;
    }

    public function render() {
        include $this->templateFilename;
    }
}
?>
